home *** CD-ROM | disk | FTP | other *** search
- if(_root.rightlimit < _parent._x && 0 < _parent.speed)
- {
- _parent.speed *= -1;
- _parent._xscale *= -1;
- }
- if(_parent._x < _root.leftlimit && _parent.speed < 0)
- {
- _parent.speed *= -1;
- _parent._xscale *= -1;
- }
- _parent._x += _parent.speed;
- if(_root.mascot._x < _parent._x + 20 && _parent._x - 20 < _root.mascot._x && _parent.timer == 0 && _root.mascot.land == false)
- {
- _parent.jumping = true;
- _parent.gotoAndStop("jump");
- }
- else if(0 < _parent.timer)
- {
- _parent.timer--;
- }
-